class LeaderBorardEntity {
  int id;
  int roomId;
  int type;
  int userId;
  String avatar;
  String gold;
  String timeAt;
  String nickname;

  LeaderBorardEntity(
      {this.id,
        this.roomId,
        this.type,
        this.userId,
        this.avatar,
        this.gold,
        this.timeAt,
        this.nickname});

  LeaderBorardEntity.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    roomId = json['room_id'];
    type = json['type'];
    userId = json['user_id'];
    avatar = json['avatar'];
    gold = json['gold'];
    timeAt = json['time_at'];
    nickname = json['nickname'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['room_id'] = this.roomId;
    data['type'] = this.type;
    data['user_id'] = this.userId;
    data['avatar'] = this.avatar;
    data['gold'] = this.gold;
    data['time_at'] = this.timeAt;
    data['nickname'] = this.nickname;
    return data;
  }
}